/**
 *  fileName:π的计算
 *  time:2020/8/18
 *  todo:$END$
 */

let num = 0
let num_all = 100000000
for (let i = 0; i < num_all; i++) {
  let a = Math.random()
  let b = Math.random()
  if(Math.sqrt(Math.pow(a,2)+(Math.pow(b,2)))<1){
    num ++
  }
}
console.log(num/num_all*4)
